﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data;
using System.Web.UI.WebControls;

namespace ChinaSoft.BLL.Common
{
    /// <summary>
    /// 区域信息
    /// </summary>
    public class AreaTreeView
    {
        /// <summary>
        /// 绑定区域信息
        /// 作者：demo
        /// 时间：2012-4-11
        /// </summary>
        /// <param name="treeview"></param>
        public void BindArea(TreeView treeview)
        {
            Bind bllBind=new Bind();
            TreeViewOperate bllTreeView=new TreeViewOperate();
            DataSet ds = bllBind.GetDataSet("select t.city,t.level_no,t.name,t.parent_id,t.sys_area_id from t_sys_area t group by t.city,t.level_no,t.name,t.parent_id,t.sys_area_id order by t.city,t.level_no,t.parent_id,t.name");
            bllTreeView.BindTreeView(ds, treeview, "name", "sys_area_id", "parent_id", false);
        }
    }
}
